package lt.ntec.danblog.server.index;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import lt.ntec.danblog.server.core.CoreController;

import java.util.Random;

public class Controller extends CoreController {

    /**
     *
     */
    private static final long serialVersionUID = -2856430091878341059L;

    public Controller(HttpServletRequest req, HttpServletResponse rsp) {
        super(req, rsp);
    }

    public void indexAction() throws IOException {
        Random generator = new Random();
        int r = generator.nextInt();
        request.setAttribute("gen", "My new blog. ID: " + r);
    }
}
